Optimal. Leaf size=40 \[ -a c \log \left (a^2 x^2+1\right )+a^2 c x \tan ^{-1}(a x)+a c \log (x)-\frac{c \tan ^{-1}(a x)}{x} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0548211, antiderivative size = 40, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 8, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.444, Rules used = {4950, 4852, 266, 36, 29, 31, 4846, 260} \[ -a c \log \left (a^2 x^2+1\right )+a^2 c x \tan ^{-1}(a x)+a c \log (x)-\frac{c \tan ^{-1}(a x)}{x} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4950
Rule 4852
Rule 266
Rule 36
Rule 29
Rule 31
Rule 4846
Rule 260
Rubi steps
\begin{align*} \int \frac{\left (c+a^2 c x^2\right ) \tan ^{-1}(a x)}{x^2} \, dx &=c \int \frac{\tan ^{-1}(a x)}{x^2} \, dx+\left (a^2 c\right ) \int \tan ^{-1}(a x) \, dx\\ &=-\frac{c \tan ^{-1}(a x)}{x}+a^2 c x \tan ^{-1}(a x)+(a c) \int \frac{1}{x \left (1+a^2 x^2\right )} \, dx-\left (a^3 c\right ) \int \frac{x}{1+a^2 x^2} \, dx\\ &=-\frac{c \tan ^{-1}(a x)}{x}+a^2 c x \tan ^{-1}(a x)-\frac{1}{2} a c \log \left (1+a^2 x^2\right )+\frac{1}{2} (a c) \operatorname{Subst}\left (\int \frac{1}{x \left (1+a^2 x\right )} \, dx,x,x^2\right )\\ &=-\frac{c \tan ^{-1}(a x)}{x}+a^2 c x \tan ^{-1}(a x)-\frac{1}{2} a c \log \left (1+a^2 x^2\right )+\frac{1}{2} (a c) \operatorname{Subst}\left (\int \frac{1}{x} \, dx,x,x^2\right )-\frac{1}{2} \left (a^3 c\right ) \operatorname{Subst}\left (\int \frac{1}{1+a^2 x} \, dx,x,x^2\right )\\ &=-\frac{c \tan ^{-1}(a x)}{x}+a^2 c x \tan ^{-1}(a x)+a c \log (x)-a c \log \left (1+a^2 x^2\right )\\ \end{align*}
Mathematica [A] time = 0.0047011, size = 40, normalized size = 1. \[ -a c \log \left (a^2 x^2+1\right )+a^2 c x \tan ^{-1}(a x)+a c \log (x)-\frac{c \tan ^{-1}(a x)}{x} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.029, size = 43, normalized size = 1.1 \begin{align*}{a}^{2}cx\arctan \left ( ax \right ) -{\frac{c\arctan \left ( ax \right ) }{x}}+ac\ln \left ( ax \right ) -ac\ln \left ({a}^{2}{x}^{2}+1 \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.987712, size = 54, normalized size = 1.35 \begin{align*} -{\left (c \log \left (a^{2} x^{2} + 1\right ) - c \log \left (x\right )\right )} a +{\left (a^{2} c x - \frac{c}{x}\right )} \arctan \left (a x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.60348, size = 100, normalized size = 2.5 \begin{align*} -\frac{a c x \log \left (a^{2} x^{2} + 1\right ) - a c x \log \left (x\right ) -{\left (a^{2} c x^{2} - c\right )} \arctan \left (a x\right )}{x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.06056, size = 41, normalized size = 1.02 \begin{align*} \begin{cases} a^{2} c x \operatorname{atan}{\left (a x \right )} + a c \log{\left (x \right )} - a c \log{\left (x^{2} + \frac{1}{a^{2}} \right )} - \frac{c \operatorname{atan}{\left (a x \right )}}{x} & \text{for}\: a \neq 0 \\0 & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.15231, size = 55, normalized size = 1.38 \begin{align*} -a c \log \left (a^{2} x^{2} + 1\right ) + \frac{1}{2} \, a c \log \left (x^{2}\right ) +{\left (a^{2} c x - \frac{c}{x}\right )} \arctan \left (a x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]